package com.iretailer.report.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Auther xjw
 * @Date 2019/1/21 0950
 * @Description
 */
@TableName(value = "s_roles")
public class Role {

    @JSONField(name = "Id")
    @TableId(value = "Id", type = IdType.UUID)
    private String id;

    @JSONField(name = "CompanyId")
    @TableField(value = "CompanyId")
    private String companyId;

    @JSONField(name = "Description")
    @TableField(value = "Description")
    private String description;


    @JSONField(name = "Name")
    @TableField(value = "Name")
    private String name;


    @JSONField(name = "ParentId")
    @TableField(value = "ParentId")
    private String parentId;

    @JSONField(name = "UpdateTime")
    @TableField(value = "UpdateTime")
    private LocalDateTime updateTime = LocalDateTime.now();

    @JSONField(name = "UpdateUser")
    @TableField(value = "UpdateUser")
    private String updateUser;

    @JSONField(name = "children")
    @TableField(exist = false)
    private List<Role> children;

    @JSONField(name = "MenuIds")
    @TableField(exist = false)
    private List<String> menuIds;


    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public List<Role> getChildren() {
        return children;
    }

    public void setChildren(List<Role> children) {
        this.children = children;
    }

    public List<String> getMenuIds() {
        return menuIds;
    }

    public void setMenuIds(List<String> menuIds) {
        this.menuIds = menuIds;
    }
}
